<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SkyGameEngine2d: SkyEngine2d::Scale9Image类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="shpe.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SkyGameEngine2d
   &#160;<span id="projectnumber">1.0.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>SkyEngine2d</b></li><li class="navelem"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="#pro-methods">Protected 成员函数</a> &#124;
<a href="class_sky_engine2d_1_1_scale9_image-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">SkyEngine2d::Scale9Image类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>点9图  
 <a href="class_sky_engine2d_1_1_scale9_image.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_scale9_image_8h_source.html">Scale9Image.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a36d539d1e8278ef7d29c3a52c421fbf7"><td class="memItemLeft" align="right" valign="top"><a id="a36d539d1e8278ef7d29c3a52c421fbf7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>draw</b> (<a class="el" href="class_sky_engine2d_1_1_i_render.html">IRender</a> *render, const <a class="el" href="class_sky_engine2d_1_1_matrix4_x4.html">Matrix4X4</a> &amp;transform)</td></tr>
<tr class="separator:a36d539d1e8278ef7d29c3a52c421fbf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d24519ada8d7b05e6cadc00964f9301"><td class="memItemLeft" align="right" valign="top"><a id="a4d24519ada8d7b05e6cadc00964f9301"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>draw</b> (<a class="el" href="class_sky_engine2d_1_1_i_render.html">IRender</a> *render, const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> &amp;draw_rect, <a class="el" href="class_sky_engine2d_1_1_camera.html">Camera</a> *cramer)</td></tr>
<tr class="separator:a4d24519ada8d7b05e6cadc00964f9301"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae87e9f8276bb09c9313331da760e3e5d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#ae87e9f8276bb09c9313331da760e3e5d">setScalingX</a> (float sx)</td></tr>
<tr class="memdesc:ae87e9f8276bb09c9313331da760e3e5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">横向缩放  <a href="#ae87e9f8276bb09c9313331da760e3e5d">更多...</a><br /></td></tr>
<tr class="separator:ae87e9f8276bb09c9313331da760e3e5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac898808a6ae8b6821890f759374b1a25"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#ac898808a6ae8b6821890f759374b1a25">setScalingY</a> (float sy)</td></tr>
<tr class="memdesc:ac898808a6ae8b6821890f759374b1a25"><td class="mdescLeft">&#160;</td><td class="mdescRight">纵向缩放  <a href="#ac898808a6ae8b6821890f759374b1a25">更多...</a><br /></td></tr>
<tr class="separator:ac898808a6ae8b6821890f759374b1a25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70a9b1b8f761859c064abb947bd42f82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a70a9b1b8f761859c064abb947bd42f82">setDisplaySize</a> (const <a class="el" href="class_sky_engine2d_1_1_size.html">Size</a> &amp;size)</td></tr>
<tr class="memdesc:a70a9b1b8f761859c064abb947bd42f82"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置图片的显示尺寸  <a href="#a70a9b1b8f761859c064abb947bd42f82">更多...</a><br /></td></tr>
<tr class="separator:a70a9b1b8f761859c064abb947bd42f82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86b775bd56704fde52890d8daf8a64e6"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_sky_engine2d_1_1_size.html">Size</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a86b775bd56704fde52890d8daf8a64e6">getDisplaySize</a> () const</td></tr>
<tr class="memdesc:a86b775bd56704fde52890d8daf8a64e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取图片当前的显示尺寸  <a href="#a86b775bd56704fde52890d8daf8a64e6">更多...</a><br /></td></tr>
<tr class="separator:a86b775bd56704fde52890d8daf8a64e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f0e5997adc48097528bb880728d8f95"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_sky_engine2d_1_1_size.html">Size</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a4f0e5997adc48097528bb880728d8f95">getImageSize</a> () const</td></tr>
<tr class="memdesc:a4f0e5997adc48097528bb880728d8f95"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取图片的原始尺寸大小  <a href="#a4f0e5997adc48097528bb880728d8f95">更多...</a><br /></td></tr>
<tr class="separator:a4f0e5997adc48097528bb880728d8f95"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:ade68f33edd96431cbe214ec05ee8871c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#ade68f33edd96431cbe214ec05ee8871c">create</a> (const std::wstring &amp;file_name, const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> cap_insets)</td></tr>
<tr class="memdesc:ade68f33edd96431cbe214ec05ee8871c"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用图片创建9宫图  <a href="#ade68f33edd96431cbe214ec05ee8871c">更多...</a><br /></td></tr>
<tr class="separator:ade68f33edd96431cbe214ec05ee8871c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe92b892008974df07eee51c572b8428"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#afe92b892008974df07eee51c572b8428">create</a> (const SpriteFrameSharedPtr &amp;sprite_frame, const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> &amp;cap_insets)</td></tr>
<tr class="memdesc:afe92b892008974df07eee51c572b8428"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过精灵帧创建9宫图  <a href="#afe92b892008974df07eee51c572b8428">更多...</a><br /></td></tr>
<tr class="separator:afe92b892008974df07eee51c572b8428"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af89a89c5f11601ddd55904cb7439fbca"><td class="memItemLeft" align="right" valign="top">static std::unique_ptr&lt; <a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#af89a89c5f11601ddd55904cb7439fbca">createUniquePtr</a> (const std::wstring &amp;file_name, const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> cap_insets)</td></tr>
<tr class="memdesc:af89a89c5f11601ddd55904cb7439fbca"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用图片创建9宫图  <a href="#af89a89c5f11601ddd55904cb7439fbca">更多...</a><br /></td></tr>
<tr class="separator:af89a89c5f11601ddd55904cb7439fbca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad24b4658a80dd92a1cfcc1c6d07d3205"><td class="memItemLeft" align="right" valign="top">static std::unique_ptr&lt; <a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#ad24b4658a80dd92a1cfcc1c6d07d3205">createUniquePtr</a> (const SpriteFrameSharedPtr &amp;sprite_frame, const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> &amp;cap_insets)</td></tr>
<tr class="memdesc:ad24b4658a80dd92a1cfcc1c6d07d3205"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过精灵帧创建9宫图  <a href="#ad24b4658a80dd92a1cfcc1c6d07d3205">更多...</a><br /></td></tr>
<tr class="separator:ad24b4658a80dd92a1cfcc1c6d07d3205"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected 成员函数</h2></td></tr>
<tr class="memitem:a64bb1ca7ed4f56ca5c4fb0f23e075905"><td class="memItemLeft" align="right" valign="top"><a id="a64bb1ca7ed4f56ca5c4fb0f23e075905"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>init</b> (const std::wstring &amp;file_name, const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> cap_insets)</td></tr>
<tr class="separator:a64bb1ca7ed4f56ca5c4fb0f23e075905"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae4a20879433c0a97a8635c154c57d25"><td class="memItemLeft" align="right" valign="top"><a id="aae4a20879433c0a97a8635c154c57d25"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>init</b> (const SpriteFrameSharedPtr &amp;sprite_frame, const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> cap_insets)</td></tr>
<tr class="separator:aae4a20879433c0a97a8635c154c57d25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43dcf56bcaa8aebfdd7e87ba228bdc85"><td class="memItemLeft" align="right" valign="top"><a id="a43dcf56bcaa8aebfdd7e87ba228bdc85"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setCapInsets</b> (const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> &amp;cap_insets)</td></tr>
<tr class="separator:a43dcf56bcaa8aebfdd7e87ba228bdc85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7036909833393d71c99ace956cf76b69"><td class="memItemLeft" align="right" valign="top"><a id="a7036909833393d71c99ace956cf76b69"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>update</b> ()</td></tr>
<tr class="separator:a7036909833393d71c99ace956cf76b69"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a080df583518628b902ff9b600c6c8942"><td class="memItemLeft" align="right" valign="top"><a id="a080df583518628b902ff9b600c6c8942"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>updateMat</b> (const <a class="el" href="class_sky_engine2d_1_1_matrix4_x4.html">Matrix4X4</a> &amp;mat)</td></tr>
<tr class="separator:a080df583518628b902ff9b600c6c8942"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b4370a17b8d0fe576e1927ce64f3f2b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a9b4370a17b8d0fe576e1927ce64f3f2b">updateVertexHorizontal</a> (float now_width)</td></tr>
<tr class="memdesc:a9b4370a17b8d0fe576e1927ce64f3f2b"><td class="mdescLeft">&#160;</td><td class="mdescRight">更新水平方向的顶点，相当于进行水平方向的缩放处理  <a href="#a9b4370a17b8d0fe576e1927ce64f3f2b">更多...</a><br /></td></tr>
<tr class="separator:a9b4370a17b8d0fe576e1927ce64f3f2b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a143b604ebcf81c4ba77929afc17e2dc1"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a143b604ebcf81c4ba77929afc17e2dc1">updateVertexVertical</a> (float now_height)</td></tr>
<tr class="memdesc:a143b604ebcf81c4ba77929afc17e2dc1"><td class="mdescLeft">&#160;</td><td class="mdescRight">更新垂直方向的定点，相当于进行垂直方向的缩放处理  <a href="#a143b604ebcf81c4ba77929afc17e2dc1">更多...</a><br /></td></tr>
<tr class="separator:a143b604ebcf81c4ba77929afc17e2dc1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>点9图 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a id="ade68f33edd96431cbe214ec05ee8871c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade68f33edd96431cbe214ec05ee8871c">&#9670;&nbsp;</a></span>create() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a>* SkyEngine2d::Scale9Image::create </td>
          <td>(</td>
          <td class="paramtype">const std::wstring &amp;&#160;</td>
          <td class="paramname"><em>file_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>cap_insets</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>使用图片创建9宫图 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td>std::wstring &amp; file_name 图片的路径 </td></tr>
    <tr><td class="paramname">const</td><td><a class="el" href="class_sky_engine2d_1_1_rect.html" title="矩形">Rect</a> cap_insets 图片的可拉伸区域 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><a class="el" href="class_sky_engine2d_1_1_scale9_image.html" title="点9图">Scale9Image</a> * </dd></dl>

</div>
</div>
<a id="afe92b892008974df07eee51c572b8428"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe92b892008974df07eee51c572b8428">&#9670;&nbsp;</a></span>create() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a>* SkyEngine2d::Scale9Image::create </td>
          <td>(</td>
          <td class="paramtype">const SpriteFrameSharedPtr &amp;&#160;</td>
          <td class="paramname"><em>sprite_frame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> &amp;&#160;</td>
          <td class="paramname"><em>cap_insets</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通过精灵帧创建9宫图 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td><a class="el" href="class_sky_engine2d_1_1_sprite_frame.html" title="精灵帧">SpriteFrame</a> &amp; sprite_frame 精灵帧 </td></tr>
    <tr><td class="paramname">const</td><td><a class="el" href="class_sky_engine2d_1_1_rect.html" title="矩形">Rect</a> &amp; cap_insets 图片的可拉伸区域 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd><a class="el" href="class_sky_engine2d_1_1_scale9_image.html" title="点9图">Scale9Image</a> * </dd></dl>

</div>
</div>
<a id="af89a89c5f11601ddd55904cb7439fbca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af89a89c5f11601ddd55904cb7439fbca">&#9670;&nbsp;</a></span>createUniquePtr() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::unique_ptr&lt;<a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a>&gt; SkyEngine2d::Scale9Image::createUniquePtr </td>
          <td>(</td>
          <td class="paramtype">const std::wstring &amp;&#160;</td>
          <td class="paramname"><em>file_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a>&#160;</td>
          <td class="paramname"><em>cap_insets</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>使用图片创建9宫图 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td>std::wstring &amp; file_name 图片的路径 </td></tr>
    <tr><td class="paramname">const</td><td><a class="el" href="class_sky_engine2d_1_1_rect.html" title="矩形">Rect</a> cap_insets 图片的可拉伸区域 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>std::unique_ptr&lt;Scale9Image&gt; </dd></dl>

</div>
</div>
<a id="ad24b4658a80dd92a1cfcc1c6d07d3205"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad24b4658a80dd92a1cfcc1c6d07d3205">&#9670;&nbsp;</a></span>createUniquePtr() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static std::unique_ptr&lt;<a class="el" href="class_sky_engine2d_1_1_scale9_image.html">Scale9Image</a>&gt; SkyEngine2d::Scale9Image::createUniquePtr </td>
          <td>(</td>
          <td class="paramtype">const SpriteFrameSharedPtr &amp;&#160;</td>
          <td class="paramname"><em>sprite_frame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_sky_engine2d_1_1_rect.html">Rect</a> &amp;&#160;</td>
          <td class="paramname"><em>cap_insets</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通过精灵帧创建9宫图 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td><a class="el" href="class_sky_engine2d_1_1_sprite_frame.html" title="精灵帧">SpriteFrame</a> &amp; sprite_frame 精灵帧 </td></tr>
    <tr><td class="paramname">const</td><td><a class="el" href="class_sky_engine2d_1_1_rect.html" title="矩形">Rect</a> &amp; cap_insets 图片的可拉伸区域 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>std::unique_ptr&lt;Scale9Image&gt; </dd></dl>

</div>
</div>
<a id="a86b775bd56704fde52890d8daf8a64e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a86b775bd56704fde52890d8daf8a64e6">&#9670;&nbsp;</a></span>getDisplaySize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; SkyEngine2d::Scale9Image::getDisplaySize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取图片当前的显示尺寸 </p>
<dl class="section return"><dt>返回</dt><dd>const <a class="el" href="class_sky_engine2d_1_1_size.html" title="尺寸">Size</a> &amp; </dd></dl>
<dl class="section see"><dt>参见</dt><dd>void <a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a70a9b1b8f761859c064abb947bd42f82" title="设置图片的显示尺寸">setDisplaySize(const Size &amp; size)</a> </dd></dl>

</div>
</div>
<a id="a4f0e5997adc48097528bb880728d8f95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f0e5997adc48097528bb880728d8f95">&#9670;&nbsp;</a></span>getImageSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; SkyEngine2d::Scale9Image::getImageSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取图片的原始尺寸大小 </p>
<dl class="section return"><dt>返回</dt><dd>const <a class="el" href="class_sky_engine2d_1_1_size.html" title="尺寸">Size</a> &amp; </dd></dl>
<dl class="section see"><dt>参见</dt><dd>const <a class="el" href="class_sky_engine2d_1_1_size.html" title="尺寸">Size</a> &amp; <a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a86b775bd56704fde52890d8daf8a64e6" title="获取图片当前的显示尺寸">getDisplaySize()const</a> </dd></dl>

</div>
</div>
<a id="a70a9b1b8f761859c064abb947bd42f82"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70a9b1b8f761859c064abb947bd42f82">&#9670;&nbsp;</a></span>setDisplaySize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SkyEngine2d::Scale9Image::setDisplaySize </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_sky_engine2d_1_1_size.html">Size</a> &amp;&#160;</td>
          <td class="paramname"><em>size</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置图片的显示尺寸 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">const</td><td><a class="el" href="class_sky_engine2d_1_1_size.html" title="尺寸">Size</a> &amp; size 尺寸 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void 图片会根据该设置值进行适当的缩放 </dd></dl>
<dl class="section see"><dt>参见</dt><dd>const <a class="el" href="class_sky_engine2d_1_1_size.html" title="尺寸">Size</a> &amp; <a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a86b775bd56704fde52890d8daf8a64e6" title="获取图片当前的显示尺寸">getDisplaySize()const</a> </dd></dl>

</div>
</div>
<a id="ae87e9f8276bb09c9313331da760e3e5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae87e9f8276bb09c9313331da760e3e5d">&#9670;&nbsp;</a></span>setScalingX()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SkyEngine2d::Scale9Image::setScalingX </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>sx</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>横向缩放 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">float</td><td>sx 缩放的比例 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section see"><dt>参见</dt><dd>void <a class="el" href="class_sky_engine2d_1_1_scale9_image.html#ac898808a6ae8b6821890f759374b1a25" title="纵向缩放">setScalingY(float sy)</a> </dd></dl>

</div>
</div>
<a id="ac898808a6ae8b6821890f759374b1a25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac898808a6ae8b6821890f759374b1a25">&#9670;&nbsp;</a></span>setScalingY()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SkyEngine2d::Scale9Image::setScalingY </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>sy</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>纵向缩放 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">float</td><td>sy 缩放比例 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section see"><dt>参见</dt><dd>void <a class="el" href="class_sky_engine2d_1_1_scale9_image.html#ae87e9f8276bb09c9313331da760e3e5d" title="横向缩放">setScalingX(float sx)</a> </dd></dl>

</div>
</div>
<a id="a9b4370a17b8d0fe576e1927ce64f3f2b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9b4370a17b8d0fe576e1927ce64f3f2b">&#9670;&nbsp;</a></span>updateVertexHorizontal()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SkyEngine2d::Scale9Image::updateVertexHorizontal </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>now_width</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>更新水平方向的顶点，相当于进行水平方向的缩放处理 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">float</td><td>now_width 现在更新的宽度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section see"><dt>参见</dt><dd>void <a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a143b604ebcf81c4ba77929afc17e2dc1" title="更新垂直方向的定点，相当于进行垂直方向的缩放处理">updateVertexVertical</a> (float now_height) </dd></dl>

</div>
</div>
<a id="a143b604ebcf81c4ba77929afc17e2dc1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a143b604ebcf81c4ba77929afc17e2dc1">&#9670;&nbsp;</a></span>updateVertexVertical()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SkyEngine2d::Scale9Image::updateVertexVertical </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>now_height</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>更新垂直方向的定点，相当于进行垂直方向的缩放处理 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">float</td><td>now_height 现在更新的高度 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>void </dd></dl>
<dl class="section see"><dt>参见</dt><dd>void <a class="el" href="class_sky_engine2d_1_1_scale9_image.html#a9b4370a17b8d0fe576e1927ce64f3f2b" title="更新水平方向的顶点，相当于进行水平方向的缩放处理">updateVertexHorizontal(float now_width)</a> </dd></dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/code/SkyGameEngine2d/src/ui/<a class="el" href="_scale9_image_8h_source.html">Scale9Image.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
